package zhaomh.zhlib.config;

public class ToggleValue extends Value {
    private boolean value;

    public ToggleValue(String name) {
        super(name);
    }

    public boolean get() {
        return value;
    }

    public void set(boolean value) {
        this.value = value;
        notifyListeners();
    }

    public void toggle() {
        set(!this.value);
    }
}
